-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clean up exceptions and split FileFormatError in LoadError and DumpError #345
Conversation
Reviewer's Guide by SourceryThis pull request addresses a task from issue #191 by splitting the File-Level Changes
Tips
|
Here's the code health analysis summary for commits Analysis Summary
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @tovrstra - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟡 General issues: 3 issues found
- 🟢 Security: all looks good
- 🟡 Testing: 1 issue found
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I went through it quickly and it seems OK.
Thanks for checking, Paul. I've also double-checked it, but could not spot obvious mistakes. The critical parts will be revisited in future pull requests, so I'll be taking a second look in any case. |
This fixes a task in #191: splitting
FileFormatError
andFileFormatWarning
intoLoad...
andDump...
versions, and fix formats that raise various generic exceptions. There is still aFileFormatError
, but it is only used for errors related to identifying or selecting the correct file format. This fix will make error messages more informative in general, and it will make the original goal of #191 easier to achieve.Note that there are a few more tasks related to exception handling in #191, not included in this PR, to keep it small. Cleanups like these quickly become large, so I've suppressed the usual oh-I-can-also-fix-this reflex and deferred these to future PRs instead.
I will YOLO-merge this on June 28 unless reviewed earlier.
Summary by Sourcery
Refactored exception handling to provide more specific error types for loading and dumping operations, and updated corresponding test cases.
FileFormatError
andFileFormatWarning
intoLoadError
,LoadWarning
,DumpError
, andDumpWarning
for more specific error categorization.LoadWarning
andLoadError
instead ofFileFormatWarning
andFileFormatError
.